<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
	<meta charset="utf-8">
	<base href="<%=basePath %>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑资源库</title>
    <link th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link th:href="@{/css/font-awesome.css}" href="../static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link th:href="@{/css/animate.css}" href="../static/css/animate.css" rel="stylesheet">
    <link th:href="@{/css/style.css}" href="../static/css/style.css" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>编辑资源库</h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">
            	<form class="form-horizontal m-t" id="RepositoryForm">     
            		<input id="id" name="id" th:value="${repositoryId}" type="hidden">
                    <div class="form-group">
                        <label class="col-sm-3 control-label required" for="repName">资源库名称：</label>
                        <div class="col-sm-7">
                            <input id="repName" name="repName" type="text" placeholder="请输入资源库名称" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label required" for="repType">资源库类型：</label>
                        <div class="col-sm-7">
                            <select id="repType" name="repType" class="form-control">
                                <option value="">请选择资源库类型</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label required" for="repUsername">登录资源库用户名：</label>
                        <div class="col-sm-7">
                            <input id="repUsername" name="repUsername" type="text" placeholder="请输入登录资源库用户名" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label required" for="repPassword">登录资源库密码：</label>
                        <div class="col-sm-7">
                            <input id="repPassword" name="repPassword" type="password" placeholder="请输入登录资源库密码" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="file">
                        <label class="col-sm-3 control-label required" for="repBasePath">文件资源库路径：</label>
                        <div class="col-sm-7">
                            <input id="repBasePath" name="repBasePath" type="text" placeholder="请输入文件资源库路径" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbType">数据库类型：</label>
                        <div class="col-sm-7">
                            <select id="dbType" name="dbType" class="form-control">
                                <option value="">请选择数据库类型</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbAccess">数据库访问模式 ：</label>
                        <div class="col-sm-7">
                            <select id="dbAccess" name="dbAccess" class="form-control">
                                <option value="">请选择数据库访问模式</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbHost">数据库主机名或者IP地址：</label>
                        <div class="col-sm-7">
                            <input id="dbHost" name="dbHost" type="text" placeholder="请输入数据库主机名或者IP地址" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbPort">数据库端口号：</label>
                        <div class="col-sm-7">
                            <input id="dbPort" name="dbPort" type="text" placeholder="请输入数据库端口号" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbName">数据库名称：</label>
                        <div class="col-sm-7">
                            <input id="dbName" name="dbName" type="text" placeholder="请输入数据库名称" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbUsername">数据库登录账号：</label>
                        <div class="col-sm-7">
                            <input id="dbUsername" name="dbUsername" type="text" placeholder="请输入数据库登录账号" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group sync-field" data-field="database">
                        <label class="col-sm-3 control-label required" for="dbPassword">数据库登录密码：</label>
                        <div class="col-sm-7">
                            <input id="dbPassword" name="dbPassword" type="password" placeholder="请输入数据库登录密码" class="form-control" aria-required="true">
                        </div>
                    </div>
                    <div class="form-group">
	                    <div class="col-sm-9 col-sm-offset-3">
	                    	<button class="btn btn-w-m btn-primary" type="button" onclick="testConnection()"><i class="fa fa-check" aria-hidden="true"></i>&nbsp;测试连接</button>
	                    	<button class="btn btn-w-m btn-primary" type="submit"><i class="fa fa-check" aria-hidden="true"></i>&nbsp;保存</button>
	                    	<button class="btn btn-w-m btn-primary" type="button" onclick="initData()"><i class="fa fa-check" aria-hidden="true"></i>&nbsp;重置</button>
	                    	<button class="btn btn-w-m btn-primary" type="button" onclick="cancel()"><i class="fa fa-reply" aria-hidden="true"></i>&nbsp;取消</button>
	                    </div>
	                </div>
	            </form>  
            </div>
        </div>
	</div>
	<!-- 全局js -->
    <script th:src="@{/js/jquery.min.js}" src="../static/js/jquery.min.js?v=2.1.4"></script>
    <!-- jQuery Validation plugin javascript-->
    <script th:src="@{/js/plugins/validate/jquery.validate.min.js}" src="../static/js/plugins/validate/jquery.validate.min.js"></script>
    <script th:src="@{/js/plugins/validate/messages_zh.min.js}" src="../static/js/plugins/validate/messages_zh.min.js"></script>
    <script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- layer javascript -->
    <script th:src="@{/js/plugins/layer/layer.min.js}" src="../static/js/plugins/layer/layer.min.js"></script>
    <!-- 自定义js -->
    <script th:src="@{/js/content.js}" src="../static/js/content.js?v=1.0.0"></script>
    <script th:src="@{/js/my/repository-edit.js}" src="../static/js/my/repository-edit.js"></script>
</body>
</html>